import React, { memo } from 'react';
import { renderRoutes } from 'react-router-config';
import { NavLink } from 'react-router-dom'; 

import { DiscoverWrapper, TopMenu } from './style';
import { dicoverMenu } from '@/common/loca_data';

export default memo(function JPDiscover(props) {

  

  return (
    <DiscoverWrapper>
      <div className="top">
        <TopMenu className="wrap-v1">
          {dicoverMenu.map((item) => {
            return (
              <div className="item" key={item.link}>
                <NavLink to={item.link}>{item.title}</NavLink>
              </div>
            );
          })}
        </TopMenu>
      </div>

      <div className=" container">{renderRoutes(props.route.routes)}</div>
    </DiscoverWrapper>
  );
});
